#include <Editor/StdAfx.h>
#include <Editor/DropTarget_AddNode.h>

#include <wx/tokenzr.h>

DropTarget_AddNode::DropTarget_AddNode(void)
{
}


DropTarget_AddNode::~DropTarget_AddNode(void)
{
}

bool DropTarget_AddNode::OnDropText(wxCoord x, wxCoord y, const wxString& text)
{
	wxArrayString tokens = wxStringTokenize(text);
	if (tokens[0] == _T("Effects"))
	{
		std::vector< std::string > templateNames;
		templateNames.push_back( (const char*)tokens[1].mb_str() );
		wxGetApp().AddParticleSystems(x, y, templateNames);
	}
	else if (tokens[0] == _T("RigidMeshes"))
	{
		wxGetApp().AddRigidMesh(x, y, tokens[1]);
	}
	else if (tokens[0] == _T("SkinnedMeshes"))
	{
		DebugUtils::Warning(DEFAULT_DEBUG_ARG, _T("Not implemented."));
	}
	return true;
}
